package com.he.dao;

import com.he.pojo.Books;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@SuppressWarnings("All")
public interface BookMapper {

    //增加一本书
    public int addBook(Books books);

    //删除一本书，注解是解决xml里参数名不一致
    public int deleteBookById(@Param("bookID") int id);

    //更新一本书
    public int updateBook(Books books);

    //查询一本书
    public Books queryBookById(@Param("bookID")int id);

    //查询全部的书
    public List<Books> queryAllBook();

    //通过名字查询书籍
    public Books queryBookByName(@Param("bookName")String bookName);

}
